package com.heima.freemark.contoller;

import com.heima.freemark.entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.client.RestTemplate;

import java.util.Map;

@Controller
public class HelloController {

    @GetMapping("hello")
    public String test(Model model) {


        model.addAttribute("name", "freemarker");

        Student student = new Student();
        student.setName("想啊大大");
        student.setAge(18);
        model.addAttribute("stu", student);

        return "01basic";
    }
}